package cn.com.dcsgo.domain.dto;

import cn.com.dcsgo.common.validation.NotBlankIfNotNull;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 添加字典类型 请求参数
 *
 * @author Dcsgo
 * @since 23/5/2025 上午 10:34
 */
@Schema(description = "添加字典类型 请求参数")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class SysDictTypeSaveDTO {
    /**
     * 字典名称
     */
    @NotBlank(message = "字典名不能为空")
    @Schema(description = "字典名称")
    private String dictName;
    /**
     * 字典类型
     */
    @NotBlank(message = "字典类型不能为空")
    @Schema(description = "字典类型")
    private String dictType;
    /**
     * 状态（0正常 1停用）
     */
    @NotNull(message = "字典状态不能为空")
    @Min(value = 0, message = "字典状态不能小于0")
    @Max(value = 1, message = "字典状态不能大于1")
    @Schema(description = "状态（0正常 1停用）")
    private Integer status;
    /**
     * 备注
     */
    @NotBlankIfNotNull(message = "备注不能为空白字符串")
    @Schema(description = "备注")
    private String remark;
}
